<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::visualization::PCLHistogramVisualizer类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::visualization::PCLHistogramVisualizer类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>PCL histogram visualizer main class.  
 <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="histogram__visualizer_8h_source.html">histogram_visualizer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1visualization_1_1_p_c_l_histogram_visualizer_1_1_exit_callback.html">ExitCallback</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1visualization_1_1_p_c_l_histogram_visualizer_1_1_exit_main_loop_timer_callback.html">ExitMainLoopTimerCallback</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aca5ee0d5f5121834a29e3e8740442aa1"><td class="memItemLeft" align="right" valign="top"><a id="aca5ee0d5f5121834a29e3e8740442aa1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#aca5ee0d5f5121834a29e3e8740442aa1">PCLHistogramVisualizer</a> ()</td></tr>
<tr class="memdesc:aca5ee0d5f5121834a29e3e8740442aa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">PCL histogram visualizer constructor. <br /></td></tr>
<tr class="separator:aca5ee0d5f5121834a29e3e8740442aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8ca4043900567ac524da7406ce213e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ae8ca4043900567ac524da7406ce213e4">spinOnce</a> (int time=1)</td></tr>
<tr class="memdesc:ae8ca4043900567ac524da7406ce213e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Spin once method. Calls the interactor and updates the screen once.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ae8ca4043900567ac524da7406ce213e4">更多...</a><br /></td></tr>
<tr class="separator:ae8ca4043900567ac524da7406ce213e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7417419ef6d7d50449a3490e948cf028"><td class="memItemLeft" align="right" valign="top"><a id="a7417419ef6d7d50449a3490e948cf028"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a7417419ef6d7d50449a3490e948cf028">spin</a> ()</td></tr>
<tr class="memdesc:a7417419ef6d7d50449a3490e948cf028"><td class="mdescLeft">&#160;</td><td class="mdescRight">Spin method. Calls the interactor and runs an internal loop. <br /></td></tr>
<tr class="separator:a7417419ef6d7d50449a3490e948cf028"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8ae80e85bddf490e61ace3816c4534"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a8c8ae80e85bddf490e61ace3816c4534">setBackgroundColor</a> (const double &amp;r, const double &amp;g, const double &amp;b)</td></tr>
<tr class="memdesc:a8c8ae80e85bddf490e61ace3816c4534"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the viewport's background color.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a8c8ae80e85bddf490e61ace3816c4534">更多...</a><br /></td></tr>
<tr class="separator:a8c8ae80e85bddf490e61ace3816c4534"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1abc1c37c66ce81e847a84d85f0f5efd"><td class="memTemplParams" colspan="2">template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:a1abc1c37c66ce81e847a84d85f0f5efd"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a1abc1c37c66ce81e847a84d85f0f5efd">addFeatureHistogram</a> (const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;cloud, int hsize, const std::string &amp;id=&quot;cloud&quot;, int win_width=640, int win_height=200)</td></tr>
<tr class="memdesc:a1abc1c37c66ce81e847a84d85f0f5efd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a histogram feature to screen as a separate window, from a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a1abc1c37c66ce81e847a84d85f0f5efd">更多...</a><br /></td></tr>
<tr class="separator:a1abc1c37c66ce81e847a84d85f0f5efd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd03b4918adf26482080d9be486ef836"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#afd03b4918adf26482080d9be486ef836">addFeatureHistogram</a> (const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;cloud, const std::string &amp;field_name, const std::string &amp;id=&quot;cloud&quot;, int win_width=640, int win_height=200)</td></tr>
<tr class="memdesc:afd03b4918adf26482080d9be486ef836"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a histogram feature to screen as a separate window from a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#afd03b4918adf26482080d9be486ef836">更多...</a><br /></td></tr>
<tr class="separator:afd03b4918adf26482080d9be486ef836"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c7c5dc855ec16716f2f7bdd2e94309b"><td class="memTemplParams" colspan="2">template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:a5c7c5dc855ec16716f2f7bdd2e94309b"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a5c7c5dc855ec16716f2f7bdd2e94309b">addFeatureHistogram</a> (const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;cloud, const std::string &amp;field_name, const int index, const std::string &amp;id=&quot;cloud&quot;, int win_width=640, int win_height=200)</td></tr>
<tr class="memdesc:a5c7c5dc855ec16716f2f7bdd2e94309b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a histogram feature to screen as a separate window.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a5c7c5dc855ec16716f2f7bdd2e94309b">更多...</a><br /></td></tr>
<tr class="separator:a5c7c5dc855ec16716f2f7bdd2e94309b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a335fb74bb12b8de4e9c3c945f868122c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a335fb74bb12b8de4e9c3c945f868122c">addFeatureHistogram</a> (const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;cloud, const std::string &amp;field_name, const int index, const std::string &amp;id=&quot;cloud&quot;, int win_width=640, int win_height=200)</td></tr>
<tr class="memdesc:a335fb74bb12b8de4e9c3c945f868122c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a histogram feature to screen as a separate window.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a335fb74bb12b8de4e9c3c945f868122c">更多...</a><br /></td></tr>
<tr class="separator:a335fb74bb12b8de4e9c3c945f868122c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafff3dcdca64cc53e6b4ec1264ea5cb0"><td class="memTemplParams" colspan="2">template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:aafff3dcdca64cc53e6b4ec1264ea5cb0"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#aafff3dcdca64cc53e6b4ec1264ea5cb0">updateFeatureHistogram</a> (const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;cloud, int hsize, const std::string &amp;id=&quot;cloud&quot;)</td></tr>
<tr class="memdesc:aafff3dcdca64cc53e6b4ec1264ea5cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update a histogram feature that is already on screen, with a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#aafff3dcdca64cc53e6b4ec1264ea5cb0">更多...</a><br /></td></tr>
<tr class="separator:aafff3dcdca64cc53e6b4ec1264ea5cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9603354726e16645d7e45df763b0975"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#af9603354726e16645d7e45df763b0975">updateFeatureHistogram</a> (const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;cloud, const std::string &amp;field_name, const std::string &amp;id=&quot;cloud&quot;)</td></tr>
<tr class="memdesc:af9603354726e16645d7e45df763b0975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update a histogram feature that is already on screen, with a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#af9603354726e16645d7e45df763b0975">更多...</a><br /></td></tr>
<tr class="separator:af9603354726e16645d7e45df763b0975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03c591f1645ae47bb8a908f12e4446fb"><td class="memTemplParams" colspan="2">template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:a03c591f1645ae47bb8a908f12e4446fb"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a03c591f1645ae47bb8a908f12e4446fb">updateFeatureHistogram</a> (const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;cloud, const std::string &amp;field_name, const int index, const std::string &amp;id=&quot;cloud&quot;)</td></tr>
<tr class="memdesc:a03c591f1645ae47bb8a908f12e4446fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update a histogram feature that is already on screen, with a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a03c591f1645ae47bb8a908f12e4446fb">更多...</a><br /></td></tr>
<tr class="separator:a03c591f1645ae47bb8a908f12e4446fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a153103bbce9c7d03f75161f1ae93547d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a153103bbce9c7d03f75161f1ae93547d">updateFeatureHistogram</a> (const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;cloud, const std::string &amp;field_name, const int index, const std::string &amp;id=&quot;cloud&quot;)</td></tr>
<tr class="memdesc:a153103bbce9c7d03f75161f1ae93547d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update a histogram feature that is already on screen, with a cloud containing a single histogram.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a153103bbce9c7d03f75161f1ae93547d">更多...</a><br /></td></tr>
<tr class="separator:a153103bbce9c7d03f75161f1ae93547d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cbc39f7f6c4e3042e804dad09f6360d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a3cbc39f7f6c4e3042e804dad09f6360d">setGlobalYRange</a> (float minp, float maxp)</td></tr>
<tr class="memdesc:a3cbc39f7f6c4e3042e804dad09f6360d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Y range to minp-maxp for all histograms.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a3cbc39f7f6c4e3042e804dad09f6360d">更多...</a><br /></td></tr>
<tr class="separator:a3cbc39f7f6c4e3042e804dad09f6360d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19a71cf602f66fceef9d428096d08d08"><td class="memItemLeft" align="right" valign="top"><a id="a19a71cf602f66fceef9d428096d08d08"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a19a71cf602f66fceef9d428096d08d08">updateWindowPositions</a> ()</td></tr>
<tr class="memdesc:a19a71cf602f66fceef9d428096d08d08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update all window positions on screen so that they fit. <br /></td></tr>
<tr class="separator:a19a71cf602f66fceef9d428096d08d08"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:ab7711e3510b615db9065526c4a870ce8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ab7711e3510b615db9065526c4a870ce8">createActor</a> (const <a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDoubleArray &gt; &amp;xy_array, <a class="el" href="classpcl_1_1visualization_1_1_ren_win_interact.html">RenWinInteract</a> &amp;renwinint, const std::string &amp;id, const int win_width, const int win_height)</td></tr>
<tr class="memdesc:ab7711e3510b615db9065526c4a870ce8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ab7711e3510b615db9065526c4a870ce8">更多...</a><br /></td></tr>
<tr class="separator:ab7711e3510b615db9065526c4a870ce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac19830074f812656ecd38101010d7f75"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ac19830074f812656ecd38101010d7f75">reCreateActor</a> (const <a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDoubleArray &gt; &amp;xy_array, <a class="el" href="classpcl_1_1visualization_1_1_ren_win_interact.html">RenWinInteract</a> *renwinupd, const int hsize)</td></tr>
<tr class="memdesc:ac19830074f812656ecd38101010d7f75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add it to the screen.  <a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ac19830074f812656ecd38101010d7f75">更多...</a><br /></td></tr>
<tr class="separator:ac19830074f812656ecd38101010d7f75"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a9e10b28882c597561d03cc5b7af2e2c7"><td class="memItemLeft" align="right" valign="top"><a id="a9e10b28882c597561d03cc5b7af2e2c7"></a>
RenWinInteractMap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a></td></tr>
<tr class="memdesc:a9e10b28882c597561d03cc5b7af2e2c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">A map of all windows on screen (with their renderers and interactors). <br /></td></tr>
<tr class="separator:a9e10b28882c597561d03cc5b7af2e2c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cc8b99f19497c4d5b848eceeea8896a"><td class="memItemLeft" align="right" valign="top"><a id="a1cc8b99f19497c4d5b848eceeea8896a"></a>
<a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; <a class="el" href="structpcl_1_1visualization_1_1_p_c_l_histogram_visualizer_1_1_exit_main_loop_timer_callback.html">ExitMainLoopTimerCallback</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a1cc8b99f19497c4d5b848eceeea8896a">exit_main_loop_timer_callback_</a></td></tr>
<tr class="memdesc:a1cc8b99f19497c4d5b848eceeea8896a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback object enabling us to leave the main loop, when a timer fires. <br /></td></tr>
<tr class="separator:a1cc8b99f19497c4d5b848eceeea8896a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59f4d96f4cecf75607724b343a824ec1"><td class="memItemLeft" align="right" valign="top"><a id="a59f4d96f4cecf75607724b343a824ec1"></a>
<a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; <a class="el" href="structpcl_1_1visualization_1_1_p_c_l_histogram_visualizer_1_1_exit_callback.html">ExitCallback</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>exit_callback_</b></td></tr>
<tr class="separator:a59f4d96f4cecf75607724b343a824ec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd21de451cb837278f49cde9b154da79"><td class="memItemLeft" align="right" valign="top"><a id="afd21de451cb837278f49cde9b154da79"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#afd21de451cb837278f49cde9b154da79">stopped_</a></td></tr>
<tr class="memdesc:afd21de451cb837278f49cde9b154da79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set to true when the histogram visualizer is ready to be terminated. <br /></td></tr>
<tr class="separator:afd21de451cb837278f49cde9b154da79"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>PCL histogram visualizer main class. </p>
<dl class="section author"><dt>作者</dt><dd>Radu Bogdan Rusu </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a335fb74bb12b8de4e9c3c945f868122c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a335fb74bb12b8de4e9c3c945f868122c">&#9670;&nbsp;</a></span>addFeatureHistogram() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_width</em> = <code>640</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_height</em> = <code>200</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a histogram feature to screen as a separate window. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the point index to extract the histogram from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_width</td><td>the width of the window </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_height</td><td>the height of the window </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afd03b4918adf26482080d9be486ef836"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd03b4918adf26482080d9be486ef836">&#9670;&nbsp;</a></span>addFeatureHistogram() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_width</em> = <code>640</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_height</em> = <code>200</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a histogram feature to screen as a separate window from a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_width</td><td>the width of the window </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_height</td><td>the height of the window </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5c7c5dc855ec16716f2f7bdd2e94309b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c7c5dc855ec16716f2f7bdd2e94309b">&#9670;&nbsp;</a></span>addFeatureHistogram() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_width</em> = <code>640</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_height</em> = <code>200</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a histogram feature to screen as a separate window. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the point index to extract the histogram from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_width</td><td>the width of the window </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_height</td><td>the height of the window </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;{</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keywordflow">if</span> (index &lt; 0 || index &gt;= cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>.size ())</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  {</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[addFeatureHistogram] Invalid point index (%d) given!\n&quot;</span>, index);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="comment">// Get the fields present in this cloud</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  std::vector&lt;pcl::PCLPointField&gt; fields;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="comment">// Check if our field exists</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="keywordtype">int</span> field_idx = pcl::getFieldIndex&lt;PointT&gt; (cloud, field_name, fields);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="keywordflow">if</span> (field_idx == -1)</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[addFeatureHistogram] The specified field &lt;%s&gt; does not exist!\n&quot;</span>, field_name.c_str ());</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  }</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  RenWinInteractMap::iterator am_it = <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.find (<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordflow">if</span> (am_it != <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.end ())</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    PCL_WARN (<span class="stringliteral">&quot;[addFeatureHistogram] A window with id &lt;%s&gt; already exists! Please choose a different id and retry.\n&quot;</span>, <span class="keywordtype">id</span>.c_str ());</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;</a> xy_array = <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;::New</a> ();</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  xy_array-&gt;SetNumberOfComponents (2);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  xy_array-&gt;SetNumberOfTuples (fields[field_idx].count);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="comment">// Parse the cloud data and store it in the array</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="keywordtype">double</span> xy[2];</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">for</span> (uint32_t d = 0; d &lt; fields[field_idx].count; ++d)</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    xy[0] = d;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="comment">//xy[1] = cloud.points[index].histogram[d];</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordtype">float</span> data;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    memcpy (&amp;data, <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>[index]) + fields[field_idx].offset + d * sizeof (<span class="keywordtype">float</span>), <span class="keyword">sizeof</span> (<span class="keywordtype">float</span>));</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    xy[1] = data;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    xy_array-&gt;SetTuple (d, xy);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  RenWinInteract renwinint;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ab7711e3510b615db9065526c4a870ce8">createActor</a> (xy_array, renwinint, <span class="keywordtype">id</span>, win_width, win_height);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="comment">// Save the pointer/ID pair to the global window map</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>[id] = renwinint;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#if ((VTK_MAJOR_VERSION == 5) &amp;&amp; (VTK_MINOR_VERSION &lt;= 4))</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  resetStoppedFlag ();</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_point_cloud_html_af16a62638198313b9c093127c492c884"><div class="ttname"><a href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">pcl::PointCloud::points</a></div><div class="ttdeci">std::vector&lt; PointT, Eigen::aligned_allocator&lt; PointT &gt; &gt; points</div><div class="ttdoc">The point data.</div><div class="ttdef"><b>Definition:</b> point_cloud.h:410</div></div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_p_c_l_histogram_visualizer_html_a9e10b28882c597561d03cc5b7af2e2c7"><div class="ttname"><a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">pcl::visualization::PCLHistogramVisualizer::wins_</a></div><div class="ttdeci">RenWinInteractMap wins_</div><div class="ttdoc">A map of all windows on screen (with their renderers and interactors).</div><div class="ttdef"><b>Definition:</b> histogram_visualizer.h:224</div></div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_p_c_l_histogram_visualizer_html_ab7711e3510b615db9065526c4a870ce8"><div class="ttname"><a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ab7711e3510b615db9065526c4a870ce8">pcl::visualization::PCLHistogramVisualizer::createActor</a></div><div class="ttdeci">void createActor(const vtkSmartPointer&lt; vtkDoubleArray &gt; &amp;xy_array, RenWinInteract &amp;renwinint, const std::string &amp;id, const int win_width, const int win_height)</div><div class="ttdoc">Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen.</div></div>
<div class="ttc" id="aclassvtk_smart_pointer_html"><div class="ttname"><a href="classvtk_smart_pointer.html">vtkSmartPointer</a></div><div class="ttdef"><b>Definition:</b> actor_map.h:50</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a1abc1c37c66ce81e847a84d85f0f5efd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1abc1c37c66ce81e847a84d85f0f5efd">&#9670;&nbsp;</a></span>addFeatureHistogram() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>hsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_width</em> = <code>640</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>win_height</em> = <code>200</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a histogram feature to screen as a separate window, from a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hsize</td><td>the length of the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_width</td><td>the width of the window </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_height</td><td>the height of the window </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  RenWinInteractMap::iterator am_it = <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.find (<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="keywordflow">if</span> (am_it != <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.end ())</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    PCL_WARN (<span class="stringliteral">&quot;[addFeatureHistogram] A window with id &lt;%s&gt; already exists! Please choose a different id and retry.\n&quot;</span>, <span class="keywordtype">id</span>.c_str ());</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;</a> xy_array = <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;::New</a> ();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  xy_array-&gt;SetNumberOfComponents (2);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  xy_array-&gt;SetNumberOfTuples (hsize);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="comment">// Parse the cloud data and store it in the array</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  <span class="keywordtype">double</span> xy[2];</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> d = 0; d &lt; hsize; ++d)</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  {</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    xy[0] = d;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    xy[1] = cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>[0].histogram[d];</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    xy_array-&gt;SetTuple (d, xy);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  RenWinInteract renwinint;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ab7711e3510b615db9065526c4a870ce8">createActor</a> (xy_array, renwinint, <span class="keywordtype">id</span>, win_width, win_height);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">// Save the pointer/ID pair to the global window map</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>[id] = renwinint;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#if ((VTK_MAJOR_VERSION == 5) &amp;&amp; (VTK_MINOR_VERSION &lt;= 4))</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  resetStoppedFlag ();</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="ab7711e3510b615db9065526c4a870ce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7711e3510b615db9065526c4a870ce8">&#9670;&nbsp;</a></span>createActor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::visualization::PCLHistogramVisualizer::createActor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDoubleArray &gt; &amp;&#160;</td>
          <td class="paramname"><em>xy_array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1visualization_1_1_ren_win_interact.html">RenWinInteract</a> &amp;&#160;</td>
          <td class="paramname"><em>renwinint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>win_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>win_height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">xy_array</td><td>the input vtkDoubleArray holding the histogram data </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">renwinint</td><td>the resultant render window interactor holding the rendered object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_width</td><td>the width of the window </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">win_height</td><td>the height of the window </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac19830074f812656ecd38101010d7f75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac19830074f812656ecd38101010d7f75">&#9670;&nbsp;</a></span>reCreateActor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::visualization::PCLHistogramVisualizer::reCreateActor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDoubleArray &gt; &amp;&#160;</td>
          <td class="paramname"><em>xy_array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classpcl_1_1visualization_1_1_ren_win_interact.html">RenWinInteract</a> *&#160;</td>
          <td class="paramname"><em>renwinupd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>hsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add it to the screen. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">xy_array</td><td>the input vtkDoubleArray holding the histogram data </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">renwinupd</td><td>the resultant render window interactor holding the rendered object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hsize</td><td><a class="el" href="structpcl_1_1_histogram.html" title="A point structure representing an N-D histogram.">Histogram</a> size </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8c8ae80e85bddf490e61ace3816c4534"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c8ae80e85bddf490e61ace3816c4534">&#9670;&nbsp;</a></span>setBackgroundColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::visualization::PCLHistogramVisualizer::setBackgroundColor </td>
          <td>(</td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the viewport's background color. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">r</td><td>the red component of the <a class="el" href="structpcl_1_1_r_g_b.html" title="A structure representing RGB color information.">RGB</a> color </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">g</td><td>the green component of the <a class="el" href="structpcl_1_1_r_g_b.html" title="A structure representing RGB color information.">RGB</a> color </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>the blue component of the <a class="el" href="structpcl_1_1_r_g_b.html" title="A structure representing RGB color information.">RGB</a> color </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3cbc39f7f6c4e3042e804dad09f6360d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cbc39f7f6c4e3042e804dad09f6360d">&#9670;&nbsp;</a></span>setGlobalYRange()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::visualization::PCLHistogramVisualizer::setGlobalYRange </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>minp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>maxp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the Y range to minp-maxp for all histograms. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">minp</td><td>the minimum Y range </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">maxp</td><td>the maximum Y range </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae8ca4043900567ac524da7406ce213e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8ca4043900567ac524da7406ce213e4">&#9670;&nbsp;</a></span>spinOnce()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::visualization::PCLHistogramVisualizer::spinOnce </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>time</em> = <code>1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Spin once method. Calls the interactor and updates the screen once. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">time</td><td>- How long (in ms) should the visualization loop be allowed to run. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a153103bbce9c7d03f75161f1ae93547d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a153103bbce9c7d03f75161f1ae93547d">&#9670;&nbsp;</a></span>updateFeatureHistogram() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update a histogram feature that is already on screen, with a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the point index to extract the histogram from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af9603354726e16645d7e45df763b0975"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9603354726e16645d7e45df763b0975">&#9670;&nbsp;</a></span>updateFeatureHistogram() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_p_c_l_point_cloud2.html">pcl::PCLPointCloud2</a> &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update a histogram feature that is already on screen, with a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a03c591f1645ae47bb8a908f12e4446fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03c591f1645ae47bb8a908f12e4446fb">&#9670;&nbsp;</a></span>updateFeatureHistogram() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update a histogram feature that is already on screen, with a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">field_name</td><td>the field name containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>the point index to extract the histogram from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;{</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  <span class="keywordflow">if</span> (index &lt; 0 || index &gt;= cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>.size ())</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;  {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[updateFeatureHistogram] Invalid point index (%d) given!\n&quot;</span>, index);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  }</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  </div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  <span class="comment">// Get the fields present in this cloud</span></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  std::vector&lt;pcl::PCLPointField&gt; fields;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <span class="comment">// Check if our field exists</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  <span class="keywordtype">int</span> field_idx = pcl::getFieldIndex&lt;PointT&gt; (cloud, field_name, fields);</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <span class="keywordflow">if</span> (field_idx == -1)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  {</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[updateFeatureHistogram] The specified field &lt;%s&gt; does not exist!\n&quot;</span>, field_name.c_str ());</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  RenWinInteractMap::iterator am_it = <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.find (<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="keywordflow">if</span> (am_it == <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.end ())</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    PCL_WARN (<span class="stringliteral">&quot;[updateFeatureHistogram] A window with id &lt;%s&gt; does not exists!.\n&quot;</span>, <span class="keywordtype">id</span>.c_str ());</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;  }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  RenWinInteract* renwinupd = &amp;<a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>[id];</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    </div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;</a> xy_array = <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;::New</a> ();</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  xy_array-&gt;SetNumberOfComponents (2);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  xy_array-&gt;SetNumberOfTuples (fields[field_idx].count);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  <span class="comment">// Parse the cloud data and store it in the array</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="keywordtype">double</span> xy[2];</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="keywordflow">for</span> (uint32_t d = 0; d &lt; fields[field_idx].count; ++d)</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    xy[0] = d;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="comment">//xy[1] = cloud.points[index].histogram[d];</span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordtype">float</span> data;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    memcpy (&amp;data, <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>[index]) + fields[field_idx].offset + d * sizeof (<span class="keywordtype">float</span>), <span class="keyword">sizeof</span> (<span class="keywordtype">float</span>));</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    xy[1] = data;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    xy_array-&gt;SetTuple (d, xy);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  }</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  </div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ac19830074f812656ecd38101010d7f75">reCreateActor</a> (xy_array, renwinupd, cloud.fields[field_idx].count - 1);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_p_c_l_histogram_visualizer_html_ac19830074f812656ecd38101010d7f75"><div class="ttname"><a href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ac19830074f812656ecd38101010d7f75">pcl::visualization::PCLHistogramVisualizer::reCreateActor</a></div><div class="ttdeci">void reCreateActor(const vtkSmartPointer&lt; vtkDoubleArray &gt; &amp;xy_array, RenWinInteract *renwinupd, const int hsize)</div><div class="ttdoc">Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add...</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aafff3dcdca64cc53e6b4ec1264ea5cb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafff3dcdca64cc53e6b4ec1264ea5cb0">&#9670;&nbsp;</a></span>updateFeatureHistogram() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>hsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>&quot;cloud&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update a histogram feature that is already on screen, with a cloud containing a single histogram. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> dataset containing the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hsize</td><td>the length of the histogram </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>the point cloud object id (default: cloud) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;{</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  RenWinInteractMap::iterator am_it = <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.find (<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordflow">if</span> (am_it == <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>.end ())</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  {</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    PCL_WARN (<span class="stringliteral">&quot;[updateFeatureHistogram] A window with id &lt;%s&gt; does not exists!.\n&quot;</span>, <span class="keywordtype">id</span>.c_str ());</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  }</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  RenWinInteract* renwinupd = &amp;<a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#a9e10b28882c597561d03cc5b7af2e2c7">wins_</a>[id];</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;</a> xy_array = <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkDoubleArray&gt;::New</a> ();</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  xy_array-&gt;SetNumberOfComponents (2);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  xy_array-&gt;SetNumberOfTuples (hsize);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <span class="comment">// Parse the cloud data and store it in the array</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordtype">double</span> xy[2];</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> d = 0; d &lt; hsize; ++d)</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  {</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    xy[0] = d;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    xy[1] = cloud.<a class="code" href="classpcl_1_1_point_cloud.html#af16a62638198313b9c093127c492c884">points</a>[0].histogram[d];</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    xy_array-&gt;SetTuple (d, xy);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  <a class="code" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html#ac19830074f812656ecd38101010d7f75">reCreateActor</a> (xy_array, renwinupd, hsize);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>visualization/include/pcl/visualization/<a class="el" href="histogram__visualizer_8h_source.html">histogram_visualizer.h</a></li>
<li>visualization/include/pcl/visualization/impl/<a class="el" href="histogram__visualizer_8hpp_source.html">histogram_visualizer.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>visualization</b></li><li class="navelem"><a class="el" href="classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html">PCLHistogramVisualizer</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
